<script>
	export default {
		onLaunch: function() {
			this.$store.dispatch('session/init');
			this.$store.dispatch('common/init');
			uni.getSetting({
				success(res) {
					if (res.authSetting['scope.userLocation'] == false) {
						uni.authorize({
							scope:"scope.userLocation"
						});
					}
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import './static/fonts/iconfont.css';
	
	.uni-ellipsis-1 {
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	
	.uni-ellipsis-2 {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	.sun-list {
		.sun-list-item {
			display: flex;
			flex-direction: row;
			flex-wrap: nowrap;
			justify-content: flex-start;
			border-bottom: 1px solid #e5e5e5;
			
			padding: 16rpx 0;
			&:first-child{
				border-top: 1px solid #e5e5e5;
			}
			.sun-list-item-media{
				width: 218rpx;
				height: 158rpx;
				flex-shrink: 0;
				image {
					width: 100%;
					height: 100%;
				}
			}
			.sun-list-item-content {
				flex-grow: 1;
				overflow: hidden;
				display: flex;
				flex-direction: column;
				flex-wrap: nowrap;
				justify-content: space-between;
				.sun-list-item-title {
					height: 40rpx;
					line-height: 40rpx;
					font-size: 14px;
					font-weight: 600;
				}
				.sun-list-item-second {
					font-size: $uni-font-size-sm;
					line-height: 1.5;
				}
				.sun-list-item-tail {
					display: flex;
					flex-direction: row;
					align-items: flex-end;
					font-size: $uni-font-size-sm;
					.sun-price {
						color: #FF3333;
						font-size: $uni-font-size-lg;
					}
					.sun-area {
						
						margin-left: 16rpx;
					}
				}
			}
		}
	}
	.pl-16{
		padding-left: 16rpx;
	}
	.pr-16{
		padding-right: 16rpx;
	}
</style>
